package com.yn.iotxiao.sql.entity.User;

import com.gitee.sunchenbin.mybatis.actable.annotation.*;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;

import java.util.Date;

@Data
@Table(comment = "用户基础信息表")
public class User {
    @Column(comment = "用户ID")
    @IsKey
    private String uid;
    @Column(comment = "姓名")
    private String name;
    @Column(comment = "登录ID",name = "loginid")
    private String loginId;
    @Column(comment = "手机号")
    private String phone;
    @Column(comment = "密码")
    private String password;
    @Column(comment = "用户类型")
    private String type;
    @Column(name = "canlogin",comment = "是否可以登录")
    private boolean canLogin;

    @Column(name = "CREATETIME",comment = "录入时间")
    @ColumnType(MySqlTypeConstant.TIMESTAMP)
    @DefaultValue("CURRENT_TIMESTAMP")
    private Date createTime;


    public User() {
        super();
    }
    public User(String uid, String name, String loginId,String phone,String password, String type,boolean canLogin) {
        this.uid = uid;
        this.name = name;
        this.loginId = loginId;
        this.phone = phone;
        this.password = password;
        this.type = type;
        this.canLogin = canLogin;
    }
}
